package Engine;

import java.io.IOException;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class Codec {
    
    public static String encodeText(String normaltext) {
        return new BASE64Encoder().encode(normaltext.getBytes());
    }

    public static String DecodeText(String decodedText) {
        try {
            return new String(new BASE64Decoder().decodeBuffer(decodedText));
        } catch (IOException e) {
        }
        return null;
    }
    
}
